home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DATATYPE.SWG / 0010_TYPEFILE.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  825b  |  30 lines

  1.  ->> You could also open the File as unTyped :-), and use blockRead to
  2.  ->> read big chunks Until you've read (recSize * number of Records beFore
  3.  
  4.  PW>       Can I do this even if the File is a Typed File to begin with?  How
  5.  PW> would I do it?  Thanks For the info.
  6.  
  7.  
  8. You can close it and reopen it, just use two Variables:
  9.  
  10.   Var
  11.     uf:   File;
  12.     tf:   File of gummi_bear;
  13.  
  14.  
  15.   begin
  16.     assign(tf, 'TEST.FIL');
  17.     reset(tf);
  18.     .
  19.     .                   (* do whatever you need the Typed File For *)
  20.     .
  21.     close(tf);
  22.     assign(uf, 'TEST.FIL');
  23.     reset(uf, 1);       (* tell runtime lib that rec size is one Byte *)
  24.     .
  25.     .                   (* now it's unTyped, you can use blockread to *)
  26.     .                   (* read an arbitrary number of Bytes *)
  27.     close(uf);
  28.   end;
  29.  
  30.